<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
        <meta name="format-detection" content="telephone=no, date=no, address=no, email=no" />
        <meta name="x-apple-disable-message-reformatting" />

        <!--dark mode not supported-->
        <meta name="color-scheme" content="light" />
        <meta name="supported-color-schemes" content="light only" />
        <!--[if !mso]><!-->
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <!--<![endif]-->
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <!--[if (gte mso 9)|(IE)]>
            <style type="text/css">
                table {
                    border-collapse: collapse;
                }
            </style>
        <![endif]-->

        <!-- Allow for better image rendering on Windows hi-DPI displays. -->
        <!--[if mso]>
            <noscript>
                <xml>
                    <o:OfficeDocumentSettings>
                        <o:AllowPNG />
                        <o:PixelsPerInch>96</o:PixelsPerInch>
                    </o:OfficeDocumentSettings>
                </xml>
            </noscript>
        <![endif]-->

        <style>
            body {
                height: 100% !important;
                margin: 0 auto !important;
                padding: 0 !important;
                width: 100% !important;
                -webkit-text-size-adjust: 100%;
                -ms-text-size-adjust: 100%;
                word-spacing: normal;
                word-break: break-word;
            }

            div[style*="margin:16px 0"] {
                margin: 0 !important;
            }

            table,
            td {
                border-collapse: collapse !important;
                mso-table-lspace: 0pt;
                mso-table-rspace: 0pt;
                -webkit-text-size-adjust: 100%;
                -ms-text-size-adjust: 100%;
            }

            img {
                border: 0;
                line-height: 100%;
                outline: none;
                text-decoration: none;
                display: block;
                margin: auto;
            }

            p,
            img {
                font-size: 18px;
                line-height: 28px;
            }

            a[x-apple-data-detectors] {
                color: inherit !important;
                font-size: inherit !important;
                font-family: inherit !important;
                font-weight: inherit !important;
                line-height: inherit !important;
            }

            u + #body a {
                color: inherit;
                font-size: inherit;
                font-family: inherit;
                font-weight: inherit;
                line-height: inherit;
            }

            .footer p {
                font-size: 14px;
                line-height: 24px;
                color: {{ email.textColor | default("#4b525d") }};
            }

            .introduction p {
                font-size: 16px;
                line-height: 21px;
            }

            .footer a,
            .introduction a {
                color: {{ email.textColor | default("#4b525d") }};
            }

        </style>

        <!--[if (gte mso 9)|(IE)]>
            <style>
                .keep-black {
                    mso-style-textfill-type: gradient;
                    mso-style-textfill-fill-gradientfill-stoplist: "0 \#000000 1 100000\,99000 \#000000 1 100000";
                    color: #ffffff !important;
                }

                a.keep-black {
                    mso-style-textfill-type: gradient;
                    mso-style-textfill-fill-gradientfill-stoplist: "0 \#000000 1 100000\,99000 \#000000 1 100000";
                    color: #ffffff !important;
                }

                .keep-white {
                    mso-style-textfill-type: gradient;
                    mso-style-textfill-fill-gradientfill-stoplist: "0 \#FFFFFF 0 100000\,100000 \#FFFFFF 0 100000";
                    color: #000000 !important;
                }

                a.keep-white {
                    mso-style-textfill-type: gradient;
                    mso-style-textfill-fill-gradientfill-stoplist: "0 \#ffffff 1 100000\,100000 \#ffffff 1 100000";
                    color: #000000 !important;
                }
            </style>
        <![endif]-->

        <style>
            @media screen and (max-width: 600px) {
                .wInner {
                    width: 90% !important;
                }

                .wFull {
                    width: 100% !important;
                }

                img.feature-image {
                    width: 100%;
                    height: auto;
                }
            }
        </style>

        <style>
            @media screen and (max-width: 600px) {
                .block {
                    display: block !important;
                    width: 100% !important;
                    box-sizing: border-box;
                }
            }
        </style>
    </head>

    <body id="body" class="body">
        <div role="article" aria-roledescription="email" xml:lang="en" lang="en">
            {% set wInner = '
                class="wInner"
                cellpadding="0"
                cellspacing="0"
                border="0"
                role="presentation"
            ' %}

            {% set contentStyle = "width: 600px; background-color: #{email.containerBackgroundColor }" %}

            {% set spacerRow %}
                <tr>
                    <td
                        aria-hidden="true"
                        align="left"
                        valign="top"
                        style="font-size: 20px; line-height: 20px; mso-line-height-rule: exactly"
                    >
                        &nbsp;
                    </td>
                </tr>
            {% endset %}

            {% set dividerLine %}
                            <tr>
                                <td
                                    colspan="3"
                                    align="left"
                                    valign="top"
                                    style="
                                        background-color: {{ email.textColor | default("#dddee0") }};
                                        font-size: 2px;
                                        line-height: 2px;
                                        mso-line-height-rule: exactly;
                                    "
                                >
                                    &nbsp;
                                </td>
                            </tr>
            {% endset %}

            {% set fontFamily = "'Helvetica Neue', Helvetica, Arial, sans-serif" %}

            {% set metaText = "font-family: #{fontFamily};
                                            color: #{email.textColor};
                                            font-size: 16px;
                                            line-height: 21px;
                                            font-weight: 300;
                                            margin-bottom: 0;" %}

            {% set footerText = "font-family: #{fontFamily};
                                            color: #{email.textColor};
                                            font-weight: 300;
                                            text-align: center;
                                            font-size: 14px;
                                            line-height: 20px;
                                            margin-bottom: 0;" %}

            {% set introductionText = "font-family: #{fontFamily};
                                            color: #{email.textColor};
                                            font-weight: 300;
                                            font-size: 16px;
                                            line-height: 21px;
                                            padding: 0 30px 8px 30px;" %}
            <table
                cellpadding="0"
                cellspacing="0"
                border="0"
                role="presentation"
                style="width: 100%; background-color: {{ email.backgroundColor }}"
            >
                 <tr>
                    <td align="center" valign="top">
                        <table {{ wInner | raw }} style="{{ contentStyle | raw }}">
                            {% if email.imageUrl|default(false) %}
                            <tr>
                                <td align="center" valign="top" style="padding: 30px 0 0 0" width="12.5%"></td>
                                <td align="center" valign="top" style="padding: 30px 0 0 0" width="75%">
                                    <div>
                                        <a
                                                {% if email.utmParams|default(false) %}
                                                    href="{{ email.siteUrl ~ '?' ~ email.utmParams }}"
                                                {% else %}
                                                    href="{{ email.siteUrl }}"
                                                {% endif %}
                                            target="_blank"
                                            style="text-decoration: none"
                                        >
                                            <!--[if gte mso 9]><table width="100%" align="center" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td height="200" align="center" ><![endif]-->
                                            <img
                                                src="{{ email.imageUrl }}"
                                                alt="{{ email.imageAlt }}"
                                                width="auto"
                                                height="auto"
                                                style="
                                                    font-family: {{ fontFamily | raw }};
                                                    color: {{ email.textColor | raw }};
                                                    text-align: center;
                                                    font-weight: bold;
                                                    font-size: 36px;
                                                    line-height: 40px;
                                                    text-decoration: none;
                                                    margin: 0 auto;
                                                    padding: 0;
                                                    max-width: 75%;
                                                    max-height: 200px;
                                                "
                                                class="logo-image"
                                                border="0"
                                            />
                                            <!--[if gte mso 9]></td></tr></tbody></table><![endif]-->
                                        </a>
                                    </div>
                                </td>
                                <td align="center" valign="top" style="padding: 30px 0 0 0" width="12.5%"></td>
                            </tr>
                            {% endif %}
                        </table>
                    </td>
                </tr>

                <tr>
                    <td align="center" valign="top">
                        <table {{ wInner | raw }}  style="{{ contentStyle | raw }}">
                            {% if email.title|default(false) %}
                                <tr>
                                    <td align="left" valign="middle" style="padding: 10px 10px 10px 0px" width="61%">
                                        <h1
                                                style="
                                            font-family: {{ fontFamily | raw }};
                                            color: {{ email.textColor }};
                                            font-weight: 300;
                                            font-size: 36px;
                                            line-height: 36px;
                                            margin: 0;
                                            text-align: center;
                                        "
                                        >
                                            {{t(email.title)}}
                                        </h1>
                                    </td>
                                </tr>
                            {% endif %}
                            {% if email.introduction|default(false) %}
                                <tr>
                                    <td align="left" valign="middle" width="61%" class="introduction" style="{{ introductionText | raw }}">
                                        {{ email.introduction | raw }}
                                    </td>
                                </tr>
                            {% endif %}
                        </table>

                        {% for contentType, sections in email.contents %}
                        <!-- {{ "Section " ~ contentType}} -->
                        {% for sectionID, section in sections %}
                        <table {{ wInner | raw }} style="{{ contentStyle | raw }}">
                            <tr>
                                <td align="left" valign="middle" style="padding: 10px 10px 10px 30px" width="61%">
                                    <p
                                        style="
                                            font-family: {{ fontFamily | raw }};
                                            color: {{ email.textColor | raw }};
                                            font-size: 16px;
                                            line-height: 16px;
                                            mso-line-height-rule: exactly;
                                            font-weight: 500;
                                            margin-top: 0;
                                            margin-bottom: 0;
                                        "
                                    >
                                        <a
                                                {% if email.utmParams|default(false) %}
                                                    href="{{ section.url ~ '?' ~ email.utmParams}}"
                                                {% else %}
                                                    href="{{ section.url }}"
                                                {% endif %}
                                            style="
                                                text-decoration: underline;
                                                font-family: {{ fontFamily | raw }};
                                                color: {{ email.textColor | raw }};
                                                font-size: 16px;
                                                line-height: 16px;
                                                mso-line-height-rule: exactly;
                                                font-weight: 500;
                                            "
                                        >
                                            {{ section.name }}
                                        </a>
                                    </p>
                                </td>
                                <td align="right" valign="middle" style="padding: 10px 30px 10px 0" width="30%">
                                    {% if section.unsubscribeLink|default(false) %}
                                        <a
                                                {% if email.utmParams|default(false) %}
                                                    href="{{ section.unsubscribeLink ~ '?' ~ email.utmParams }}"
                                                {% else %}
                                                    href="{{ section.unsubscribeLink }}"
                                                {% endif %}

                                            target="_blank" style="text-decoration: none">
                                        <span
                                            style="
                                                font-family: {{ fontFamily | raw }};
                                                color: {{ email.textColor | raw }};
                                                text-decoration: underline;
                                                font-weight: 300;
                                                font-size: 14px;
                                            "
                                        >
                                            {{t("Hide " ~contentType )}}
                                        </span>
                                        </a>
                                    {% endif %}
                                </td>
                            </tr>
                            <tr>
                                <td
                                    colspan="3"
                                    align="left"
                                    valign="top"
                                >
                                    <div style="background-color: {{ email.textColor | default("#dddee0") }}; height: 2px; margin: 10px 30px 0 30px"></div>
                                </td>
                            </tr>
                        </table>

                        {% for discussion in section.discussions %}
                        <table {{ wInner | raw }} style="{{ contentStyle | raw }}">
                            <tr>
                                <td
                                    class="block"
                                    align="left"
                                    valign="top"
                                    style="padding: 20px 30px 10px 30px"
                                    width="70%"
                                >
                                    <a
                                            {% if email.utmParams|default(false) %}
                                                href="{{ discussion.url ~ '?' ~ email.utmParams }}"
                                            {% else %}
                                                href="{{ discussion.url }}"
                                            {% endif %}
                                        target="_blank"
                                        style="color: {{ email.textColor | raw }}; text-decoration: underline; font-weight: 500"
                                    >
                                        <span
                                            style="
                                                font-family: {{ fontFamily | raw }};
                                                color: {{ email.textColor | raw }};
                                                text-decoration: none;
                                                font-weight: 500;
                                                font-size: 21px;
                                                line-height: 24px;
                                            "
                                        >
                                            {{ discussion.name }}
                                        </span>
                                    </a>

                                    <p
                                        style="
                                            font-family: {{ fontFamily | raw }};
                                            color: {{ email.textColor | raw }};
                                            font-size: 16px;
                                            line-height: 21px;
                                            font-weight: 300;
                                            margin-top: 9px;
                                            margin-bottom: 0;
                                        "
                                    >
                                        {{ discussion.excerpt }}
                                        <a
                                                {% if email.utmParams|default(false) %}
                                                    href="{{ discussion.url ~ '?' ~ email.utmParams }}"
                                                {% else %}
                                                    href="{{ discussion.url }}"
                                                {% endif %}
                                            target="_blank"
                                            style="
                                                font-family: {{ fontFamily | raw }};
                                                color: {{ email.textColor | raw }};
                                                text-decoration: underline;
                                                font-weight: 300;
                                            "
                                        >
                                            {{t("view more")}}
                                        </a>
                                    </p>
                                    <p
                                        style="
                                            {{ metaText | raw }}
                                            margin-top: 9px;
                                        "
                                    >
                                        {% if discussion.countViews|default(false) %}
                                        <span style="margin-right: 10px">{{ discussion.countViews }}&nbsp;{{t("views")}}</span>
                                        {% endif %}
                                        {% if discussion.countComments|default(false) %}
                                        <span style="margin-right: 10px">{{ discussion.countComments }}&nbsp;{{t("comments")}}</span>
                                        {% endif %}
                                        {% if discussion.score|default(false) %}
                                        <span style="margin-right: 10px">{{ discussion.score }}&nbsp;{{t("reactions")}}</span>
                                        {% endif %}
                                    </p>
                                    {% if discussion.insertUser|default(false) %}
                                    <p
                                        style="
                                            {{ metaText | raw }}
                                            margin-top: 0px;
                                        "
                                    >
                                    {{sprintf(t("Started by %s"), discussion.insertUser.name)}}

                                    </p>
                                    {% endif %}
                                </td>
                                {% if discussion.image|default(false) %}
                                <td class="block" align="right" valign="top" style="padding: 10px 0" width="30%">
                                    <img
                                        src="{{ discussion.image.url }}"
                                        width="190"
                                        height="auto"
                                        border="0"
                                        alt="{{ discussion.image.alt }}"
                                        class="feature-image"
                                    />
                                </td>
                                {% endif %}
                            </tr>
                        </table>
                        {% endfor %}

                        <table {{ wInner | raw }} style="{{ contentStyle | raw }}">
                            {{ spacerRow | raw }}
                        </table>
                        {% endfor %}
                        {% endfor %}

                        <table {{ wInner | raw }} style="{{ contentStyle | raw }}">
                            {{ spacerRow | raw }}
                            <tr>
                                <td width="33%"></td>
                                <td
                                    width="33%"
                                    align="center"
                                    valign="top"
                                    style="background-color: {{ email.buttonBackgroundColor | raw }}; padding: 12px 12px 12px 12px; width: 130px"
                                >
                                    <a
                                            {% if email.utmParams|default(false) %}
                                                href="{{ email.siteUrl }}/discussions?followed=true&sort=-hot&{{ email.utmParams }}"
                                            {% else %}
                                                href="{{ email.siteUrl }}/discussions?followed=true&sort=-hot"
                                            {% endif %}
                                        style="
                                            font-family: {{ fontFamily | raw }};
                                            background-color: {{ email.buttonBackgroundColor | raw }};
                                            color: {{ email.buttonTextColor | raw }};
                                            text-decoration: none;
                                            font-size: 16px;
                                            white-space: nowrap;
                                        "
                                        target="_blank"
                                    >
                                        {{t("View More Posts")}}
                                    </a>
                                </td>
                                <td width="33%"></td>
                            </tr>
                            {{ spacerRow | raw }}
                        </table>

                        <table {{ wInner | raw }} style="width: 600px">
                            {{ spacerRow | raw }}
                            {{ dividerLine | raw }}

                            {{ spacerRow | raw }}
                            <!-- FOOTER -->
                            {% if email.footer|default(false) %}
                            <tr class="footer">
                                <td
                                    align="center"
                                    style="
                                        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
                                        color: {{ email.textColor | default("#555a62") }};
                                        font-weight: 300;
                                        text-align: center;
                                        font-size: 14px;
                                        line-height: 20px;
                                        margin-bottom: 0;
                                    ">
                                        {{ email.footer | raw }}
                                </td>
                            </tr>
                            {% endif %}
                            <tr class="footer">
                                <td align="center">
                                    <p
                                        style="
                                            {{ footerText | raw }}
                                        "
                                    >
                                        {{t(email.digestSubscribeReason)}}
                                    </p>

                                    <p
                                        style="
                                            {{ footerText | raw }}
                                        "
                                    >
                                        <a
                                                {% if email.utmParams|default(false) %}
                                                    href="{{ email.digestUnsubscribeLink ~ '?' ~ email.utmParams }}"
                                                {% else %}
                                                    href="{{ email.digestUnsubscribeLink }}"
                                                {% endif %}
                                            target="_blank"
                                            data-saferedirecturl="{{ email.digestUnsubscribeLink }}"
                                            style="color: {{ email.textColor | raw }}; text-decoration: underline"
                                            >{{t("Unsubscribe from the email digest")}}</a
                                        >
                                    </p>

                                    <p
                                        style="
                                            {{ footerText | raw }}
                                        "
                                    >
                                        <a
                                                {% if email.utmParams|default(false) %}
                                                    href="{{ email.siteUrl }}/profile/preferences?{{ email.utmParams }}"
                                                {% else %}
                                                    href="{{ email.siteUrl }}/profile/preferences"
                                                {% endif %}
                                            target="_blank"
                                            data-saferedirecturl="{{ email.siteUrl }}/profile/preferences"
                                            style="color: {{ email.textColor | raw }}; text-decoration: underline"
                                            >{{t("Manage your notification preferences")}}</a
                                        >
                                    </p>
                                </td>
                            </tr>
                            {{ spacerRow | raw }}
                            {{ spacerRow | raw }}
                        </table>

                    </td>
                </tr>
            </table>
        </div>
    </body>
</html>
